<?php
namespace app\admin\controller;

use app\common\controller\AdminController;
use app\common\logic\BaseLogic;
use app\common\logic\SysLogic;

class SiteConfig extends AdminController
{
    public function initialize(){
        $this->modelName = 'SiteConfig';
        $this->controllerName = '系统设置';
        $this->noProjectAction = [
            'index',
        ];
        parent::initialize();
    }

    protected function handle_add_post_after(&$param,&$flag){
        if($flag['err_code'] === 0){
            $sysLogic = new SysLogic();
            $sysLogic->_claerSystemSiteConfig();
        }
        return ['err_code' => 0 , 'msg' => '默认通过'];
    }

    protected function handle_edit_post_after(&$param,&$jieguo){
        if($jieguo['err_code'] === 0){
            $sysLogic = new SysLogic();
            $sysLogic->_claerSystemSiteConfig();
        }
        return ['err_code' => 0 , 'msg' => '默认通过'];
    }

    protected function handle_del_after(&$param,&$jieguo){
        if($jieguo['err_code'] === 0){
            $sysLogic = new SysLogic();
            $sysLogic->_claerSystemSiteConfig();
        }
        return ['err_code' => 0 , 'msg' => '默认通过'];
    }
}
